package com.ruoyi.system.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.ScanningCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/scanningCode")
public class ScanningCodeController {

    @Autowired
    private ScanningCodeService scanningCodeService;

    @GetMapping("/codeUrl/{url}")
    public AjaxResult codeUrl(@PathVariable("url") String url) throws Exception {

        scanningCodeService.codeUrl(url);

        return AjaxResult.success();
    }

}
